package com.w2cx.selenium.page;

import com.w2cx.selenium.base.DriverBase;
import com.w2cx.selenium.util.Locator;
import org.openqa.selenium.WebElement;

import java.util.List;

public class ConfigOperatePositionPage extends BasePage {

    public ConfigOperatePositionPage(DriverBase driver){
        super(driver);
    }

   //获取运营管理菜单
    public WebElement getOperateManageMenu(){
       //return this.getOperateManageMenu();
        List<WebElement> list = elements(Locator.getByLocator("firstMenuList"));
        WebElement element = list.get(5);
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //获取“配置运营位”菜单
    public WebElement getConfigOperatePositionMenu(){
        WebElement element = element(Locator.getByLocator("configOperatePositionMenm"));
        return element;
    }

    //获取“添加”按钮
    public WebElement getAddBtn(){
        WebElement element = element(Locator.getByLocator("operatePositionAddBtn"));
        return element;
    }

    //获取“运营位名称”输入框
    public WebElement getOperateNameInput(){
        return  element(Locator.getByLocator("operatePositionName"));
    }

    //获取“运营位标识”输入框
    public WebElement getOperateSignInput(){
        return element(Locator.getByLocator("operatePositionSign"));
    }


    //获取“运营位图片”按钮
    public WebElement getAddOperateImgBtn(){
        return  element(Locator.getByLocator("operatePosiImgAddBtn"));
    }

    //获取"运营位类别"下拉框
    public WebElement getOperateCateDownList(){
        return element(Locator.getByLocator("operatePosiCategory"));
    }

    //获取运营位类别选项
    public WebElement getOperateCateSelect(){
        return element(Locator.getByLocator("operatePostCateSelect"));
    }


    //获取所属页面选项
    public WebElement belongToPageSelect(){
        return element(Locator.getByLocator("belongToPage"));
    }

    //获取推荐数量输入框
    public WebElement getRecommondNumInput(){
        return element(Locator.getByLocator("recommondNum"));
    }


    //获取“确定”按钮
    public WebElement getConfirmBtn(){
        return element(Locator.getByLocator("addOperaPosiConfirmBtn"));
    }

    //获取第一条
    public WebElement getFirstOperaPosition(){
        return element(Locator.getByLocator("firstOperaPosiName"));
    }

    //获取第一条删除按钮
    public WebElement getFirstOperaPosiDelBtn(){
        return element(Locator.getByLocator("firstOperatePositionDelBtn"));
    }

    //获取删除确定按钮
    public WebElement getDelConfirmBtn(){
        return element(Locator.getByLocator("delConfirmBtn"));
    }


}
